package com.ruiysoft.entity.statistics;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author liyahui
 * @since 2019-03-25
 */
@TableName("shop_user_statistics")
public class ShopUserStatistics extends Model<ShopUserStatistics> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 店铺id
     */
    @TableField("shop_id")
    private Long shopId;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * skuid
     */
    @TableField("sku_id")
    private Long skuId;

    /**
     * 类型（访问哪个页面）
     */
    private Integer type;

    /**
     * 访问时间
     */
    @TableField("in_time")
    private Date inTime;

    /**
     * 停留时间毫秒
     */
    @TableField("remain_time")
    private String remainTime;

    private String ip;

    private String origin;

    public Long getId() {
        return id;
    }

    public ShopUserStatistics setId(Long id) {
        this.id = id;
        return this;
    }
    public Long getShopId() {
        return shopId;
    }

    public ShopUserStatistics setShopId(Long shopId) {
        this.shopId = shopId;
        return this;
    }
    public Long getUserId() {
        return userId;
    }

    public ShopUserStatistics setUserId(Long userId) {
        this.userId = userId;
        return this;
    }
    public Long getSkuId() {
        return skuId;
    }

    public ShopUserStatistics setSkuId(Long skuId) {
        this.skuId = skuId;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public ShopUserStatistics setType(Integer type) {
        this.type = type;
        return this;
    }
    public Date getInTime() {
        return inTime;
    }

    public ShopUserStatistics setInTime(Date inTime) {
        this.inTime = inTime;
        return this;
    }
    public String getRemainTime() {
        return remainTime;
    }

    public ShopUserStatistics setRemainTime(String remainTime) {
        this.remainTime = remainTime;
        return this;
    }
    public String getIp() {
        return ip;
    }

    public ShopUserStatistics setIp(String ip) {
        this.ip = ip;
        return this;
    }
    public String getOrigin() {
        return origin;
    }

    public ShopUserStatistics setOrigin(String origin) {
        this.origin = origin;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ShopUserStatistics{" +
        "id=" + id +
        ", shopId=" + shopId +
        ", userId=" + userId +
        ", skuId=" + skuId +
        ", type=" + type +
        ", inTime=" + inTime +
        ", remainTime=" + remainTime +
        ", ip=" + ip +
        ", origin=" + origin +
        "}";
    }
}
